//
//  MBProgressHUDHelper.h
//  DLTravels
//
//  Created by liyan on 2016/12/28.
//  Copyright © 2016年 DianlE. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <MBProgressHUD/MBProgressHUD-umbrella.h>
@interface MBProgressHUDHelper : NSObject
/**
 * 显示MBProgressHUD指示器
 * api parameters 说明
 * aTitle 标题
 * aMsg 信息
 * aImg 图片, 为nil时,只显示标题
 * d 延时消失时间, 为0时需要主动隐藏
 * blockE 执行的代码快
 * blockF 结束时的代码块
 * 执行时改变hub需要调用Common_MainFun(aFun)
 */
#define HIDDENMBProgressHUD [MBProgressHUDHelper hiddenMBProgressHUD];
+(void) hiddenMBProgressHUD;

+(MBProgressHUD *) MBProgressHUD;

#define SHOWMBProgressHUD(aTitle, aMsg, aImg, aDimBG, aDelay) [MBProgressHUDHelper showMBProgressHUDTitle:aTitle msg:aMsg image:aImg dimBG:aDimBG delay:aDelay];
+(MBProgressHUD *) showMBProgressHUDTitle:(NSString *)aTitle msg:(NSString *)aMsg image:(UIImage *)aImg dimBG:(BOOL)dimBG delay:(float)d;


#define SHOWMBProgressHUDIndeterminate(aTitle, aMsg, aDimBG) [MBProgressHUDHelper showMBProgressHUDModeIndeterminateTitle:aTitle msg:aMsg dimBG:aDimBG];
+(MBProgressHUD *) showMBProgressHUDModeIndeterminateTitle:(NSString *)aTitle msg:(NSString *)aMsg dimBG:(BOOL)dimBG;

+(MBProgressHUD *) showMBProgressHUDTitle:(NSString *)aTitle msg:(NSString *)aMsg dimBG:(BOOL)dimBG executeBlock:(void(^)(MBProgressHUD *hud))blockE finishBlock:(void(^)(void))blockF;
@end
